<?php
$query = \"SELECT * FROM newsy ORDER BY 'id' DESC LIMIT 5\" ;
$query7 = \"SELECT * FROM emots\";
{
$emoty = array(\"\".$row7[\"emot1\"].\"\" => \"<img src='http://xxx/emots/\".$row7[\"emot2\"].\"'>\" ); }
if ($_SESSION[\"emots\"]==\"1\")
{
$tresc = str_replace($emoty, $emoty, $row[\"tresc\"]);
}
else {
$tresc = $row[\"tresc\"];
}
echo \"<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" class=g7><tr bgcolor=\"#384B5A\"><td>\".$row[\"tytul\"].\"</td></tr></table> <table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=g4><tr bgcolor=\"#334B5E\"><td><div align=justify>\".$tresc.\"<p align=right><a href=index.php?co=news&id=\".$row[\"id\"].\" class=link1>skomentuj ($ile)</a></p></td></tr></table><br>\";
} }
?>
w bazie w polu emot1 jest znak do zastapienia a w polu emot2 adres obrazka ktory ma zastapic ten znak. Jak wiec zastapic wszystkie emoty w newsach?
Ten post edytował ferr 2.02.2005, 19:47:03